//
//  CJDefaultHeader.h
//  DatangLife
//
//  Created by 娜 on 2018/4/19.
//  Copyright © 2018年 DatangLife. All rights reserved.
//

#ifndef CJDefaultHeader_h
#define CJDefaultHeader_h


#define GAP8 8 // 常用宽度

#define GAP15 15 // 常用宽度

#define is_iPhoneX kScreenHeight == 812

#define Height_NavContentBar 44.0f

#define Height_StatusBar (is_iPhoneX ? 44.f : 20.f)

#define Height_NavBar (is_iPhoneX ? 88.f : 64.f)

#define Height_TabBar (is_iPhoneX ? 83.f : 49.f)

#define Height_TabBar_Space (is_iPhoneX  ? 34 : 0)

/**
 *  弱指针
 */
#define WeakSelf(weakSelf)  __weak __typeof(&*self)weakSelf = self;

/** 弱引用 */
#define WEAKSELF __weak typeof(self) weakSelf = self;

#pragma mark ============== 颜色 ==============
/**随机颜色设置*/
#define ANYColorRandom kRGBColor(arc4random_uniform(256), arc4random_uniform(256), arc4random_uniform(256))
#define kWhiteColor [UIColor whiteColor]
#define kBlackColor [UIColor blackColor]
#define kDarkGrayColor [UIColor darkGrayColor]
#define kLightGrayColor [UIColor lightGrayColor]
#define kGrayColor [UIColor grayColor]
#define kRedColor [UIColor redColor]
#define kGreenColor [UIColor greenColor]
#define kBlueColor [UIColor blueColor]
#define kCyanColor [UIColor cyanColor]
#define kYellowColor [UIColor yellowColor]
#define kMagentaColor [UIColor magentaColor]
#define kOrangeColor [UIColor orangeColor]
#define kPurpleColor [UIColor purpleColor]
#define kBrownColor [UIColor brownColor]
#define kClearColor [UIColor clearColor]
#define kRGBAColor(r,g,b,a) [UIColor colorWithRed:r/255.0f green:g/255.0f blue:b/255.0f alpha:a]
#define kRGBColor(r,g,b) kRGBAColor(r,g,b,1.0f)
#define kNomalTextBlackColor @"#333333"
#define kDetailTextBlackColor @"#666666"
#define kDetailTextGrayBlackColor @"#999999"
#define kLineViewBgColor @"D9D9D9"
#define kSeperatorColor @"D9D9D9"
#define kCommonBgColor @"#F5F9F8"


#define kCommonRedColor kRGBColor(68, 119, 196)

#define kCommonLightColor kRGBColor(80, 210, 194)

#define kNavViewBackColor kRGBColor(80, 210, 194)

#define kNavViewTitleColor kRGBColor(255, 255, 255)

#define kTabbarSelectedColor @"#333333"

#define kTabbarNomalColor @"#333333"

#define kTabbarBackColor  kRGBColor(80, 210, 194)


#define kPlaceholderImage [UIImage imageNamed:@"placeholder"]

#pragma mark ============== 系统UI ==============



/***  当前屏幕宽度 */
#define kScreenWidth  [[UIScreen mainScreen] bounds].size.width
/***  当前屏幕高度 */
#define kScreenHeight  [[UIScreen mainScreen] bounds].size.height
/***  普通字体 */
#define kFont(size) [UIFont systemFontOfSize:size]
/***  粗体 */
#define kBoldFont(size) [UIFont boldSystemFontOfSize:size]
/***  普通字体 */
#define kFont(size) [UIFont systemFontOfSize:size]


#define IMG(name)       [UIImage imageNamed:name]

//比屏幕比率
#define kRate kScreenWidth/375.0

#define kSize(a) a*([UIScreen mainScreen].bounds.size.width/375.0)

#define kHeightScal(a) 1/(a *(1/kScreenWidth))

#endif /* CJDefaultHeader_h */
